<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>houdunren.com</title>
  </head>
  <body>
    <div>hdcms</div>
    <div>houdunren</div>
    <script>
      let divs = document.querySelectorAll("div");
      // console.log(divs);
      console.log(
        Array.from(divs, function(item) {
          item.style.backgroundColor = "red";
          return item;
        })
      );
      // console.log(Array.isArray([]));
      // let hd = [1, 3, 4].join("-");
      // console.log(location.href + "?id=" + hd);

      // let str = "hdcms";
      // console.log(str.split(","));
      // length
      // console.log(str.length);
      // console.log(Array.from(str));
      // let obj = {
      //   0: "hdcms",
      //   1: "houdunren",
      //   length: 2
      // };
      // console.log(Array.from(obj));
    </script>
  </body>
</html>
